<?php

/**
 * This is the model metadata class for table "goods_hotel".
 */
class GoodsHotelMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'goods_hotel';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('bed_type, floor, no_smoking, broadband_type, bed_additional, bathroom_type', 'required'),
			array('uid, hotel_id, goods_id, has_breakfast, breakfast_type, bed_type, no_smoking, broadband_type, bed_additional, bathroom_type, num', 'numerical', 'integerOnly'=>true),
			array('room_type', 'length', 'max'=>255),
			array('floor', 'length', 'max'=>20),
			array('notes, info', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, uid, hotel_id, goods_id, room_type, has_breakfast, breakfast_type, bed_type, floor, no_smoking, broadband_type, bed_additional, bathroom_type, notes, info, num', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'uid' => '用户',
			'hotel_id' => '酒店',
			'goods_id' => '商品id',
			'room_type' => '房间类型',
			'has_breakfast' => '含早餐',
			'breakfast_type' => '早餐',
			'bed_type' => '床型',
			'floor' => '楼层',
			'no_smoking' => '无烟房',
			'broadband_type' => '宽带',
			'bed_additional' => '加床',
			'bathroom_type' => '卫浴',
			'notes' => '预定须知',
			'info' => '房间信息',
			'num' => 'Num',
		);
	}
}